
#include "log.h"
#include "gpiointerface.h"
#include "pin.h"
#include "helpers.h"

#include <iostream>

using namespace std;


GpioInterface::GpioInterface() {
    cout << "Construction GpioInterface";
}

Pin* GpioInterface::_declareNewPin(int pinNum, int mode){

    Pin* newPin = Pin::declarePinUse(pinNum, mode);

    this->pins.push_back(newPin);

    return newPin;

}

void GpioInterface::printPinsStates(){

    list<Pin*>::iterator it;

    for(it= this->pins.begin() ; it != this->pins.end(); it++) {
        (*it)->printPinState();
    }

    return;

}
